package com.fish.anne.model;

import com.fish.anne.model.BaseObject;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.Table;

import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;

import java.io.Serializable;

@Entity
@Table(name="auto_level_price" )
public class AutoLevelPrice extends BaseObject implements Serializable {
    private Long levelPriceId;
    private Long autoId;
    private Long levelId;
    private Long levelPrice;

    @Id   @GeneratedValue(strategy = GenerationType.AUTO)    
    public Long getLevelPriceId() {
        return this.levelPriceId;
    }
    
    public void setLevelPriceId(Long levelPriceId) {
        this.levelPriceId = levelPriceId;
    }
    
    @Column(name="auto_id", nullable=false)
    public Long getAutoId() {
        return this.autoId;
    }
    
    public void setAutoId(Long autoId) {
        this.autoId = autoId;
    }
    
    @Column(name="level_id", nullable=false)
    public Long getLevelId() {
        return this.levelId;
    }
    
    public void setLevelId(Long levelId) {
        this.levelId = levelId;
    }
    
    @Column(name="level_price", nullable=false)
    public Long getLevelPrice() {
        return this.levelPrice;
    }
    
    public void setLevelPrice(Long levelPrice) {
        this.levelPrice = levelPrice;
    }

    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        AutoLevelPrice pojo = (AutoLevelPrice) o;

        if (autoId != null ? !autoId.equals(pojo.autoId) : pojo.autoId != null) return false;
        if (levelId != null ? !levelId.equals(pojo.levelId) : pojo.levelId != null) return false;
        if (levelPrice != null ? !levelPrice.equals(pojo.levelPrice) : pojo.levelPrice != null) return false;

        return true;
    }

    public int hashCode() {
        int result = 0;
        result = (autoId != null ? autoId.hashCode() : 0);
        result = 31 * result + (levelId != null ? levelId.hashCode() : 0);
        result = 31 * result + (levelPrice != null ? levelPrice.hashCode() : 0);

        return result;
    }

    public String toString() {
        StringBuffer sb = new StringBuffer(getClass().getSimpleName());

        sb.append(" [");
        sb.append("levelPriceId").append("='").append(getLevelPriceId()).append("', ");
        sb.append("autoId").append("='").append(getAutoId()).append("', ");
        sb.append("levelId").append("='").append(getLevelId()).append("', ");
        sb.append("levelPrice").append("='").append(getLevelPrice()).append("'");
        sb.append("]");
      
        return sb.toString();
    }

}
